home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / fg / fgdef.bas < prev    next >
Encoding:
BASIC Source File  |  1994-11-02  |  18.9 KB  |  283 lines

  1. Option Explicit
  2. 'Core definition of the VB API
  3.  
  4. Type PointAPI
  5.     X As Integer
  6.     Y As Integer
  7. End Type
  8.  
  9. Type SCALEPOINTAPI
  10.     X As Double
  11.     Y As Double
  12. End Type
  13.  
  14. 'Object Creation functions
  15.  
  16. Declare Function CreatePicture Lib "FG.VBX" Alias "CreatePicture" (ByVal PictureHandle&) As Long
  17. Declare Function CreateGlobalPicture Lib "FG.VBX" Alias "CreateGlobalPicture" () As Long
  18.  
  19. ' Physical objects
  20.  
  21. Declare Function CreateArc Lib "FG.VBX" Alias "CreateArc" (ByVal PictureHandle&, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%, ByVal X3%, ByVal Y3%, ByVal X4%, ByVal Y4%) As Long
  22. Declare Function CreateChord Lib "FG.VBX" Alias "CreateChord" (ByVal PictureHandle&, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%, ByVal X3%, ByVal Y3%, ByVal X4%, ByVal Y4%) As Long
  23. Declare Function CreateDrawText Lib "FG.VBX" Alias "CreateDrawText" (ByVal PictureHandle&, ByVal NewText$, ByVal RectLeft%, ByVal RectTop%, ByVal RectWidth%, ByVal RectHeight%, ByVal nFormat%) As Long
  24. Declare Function CreateEllipse Lib "FG.VBX" Alias "CreateEllipse" (ByVal PictureHandle&, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%) As Long
  25. Declare Function CreateLine Lib "FG.VBX" Alias "CreateLine" (ByVal PictureHandle&, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%) As Long
  26. Declare Function CreatePolygon Lib "FG.VBX" Alias "CreatePolygon" (ByVal PictureHandle&) As Long
  27. Declare Function BCreatePolygon Lib "FG.VBX" Alias "BCreatePolygon" (ByVal PictureHandle&, ThePoints() As PointAPI) As Long
  28. Declare Function CreatePie Lib "FG.VBX" Alias "CreatePie" (ByVal PictureHandle&, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%, ByVal X3%, ByVal Y3%, ByVal X4%, ByVal Y4%) As Long
  29. Declare Function CreatePolyLine Lib "FG.VBX" Alias "CreatePolyLine" (ByVal PictureHandle&) As Long
  30. Declare Function BCreatePolyLine Lib "FG.VBX" Alias "BCreatePolyLine" (ByVal PictureHandle&, ThePoints() As PointAPI) As Long
  31. Declare Function CreatePolyPolygon Lib "FG.VBX" Alias "CreatePolyPolygon" (ByVal PictureHandle&) As Long
  32. Declare Function BCreatePolyPolygon Lib "FG.VBX" Alias "BCreatePolyPolygon" (ByVal PictureHandle&, ThePoints() As PointAPI, Polycounts%()) As Long
  33. Declare Function CReateRectangle Lib "FG.VBX" Alias "CreateRectangle" (ByVal PictureHandle&, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%) As Long
  34. Declare Function CreateRoundRect Lib "FG.VBX" Alias "CreateRoundRect" (ByVal PictureHandle&, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%, ByVal X3%, ByVal Y3%) As Long
  35. Declare Function CreateTextOut Lib "FG.VBX" Alias "CreateTextOut" (ByVal PictureHandle&, ByVal X1%, ByVal Y1%, ByVal NewText$) As Long
  36. Declare Function BCreateTabbedTextOut Lib "FG.VBX" Alias "BCreateTabbedTextOut" (ByVal PictureHandle&, ByVal X%, ByVal Y%, ByVal NewText$, TabStopPositions%(), ByVal TabOrigin%) As Long
  37. Declare Function CreatePolyTextOut Lib "FG.VBX" Alias "CreatePolyTextOut" (ByVal PictureHandle&) As Long
  38. Declare Function BCreatePolyTextOut Lib "FG.VBX" Alias "BCreatePolyTextOut" (ByVal PictureHandle&, ThePoints() As PointAPI, OutText$()) As Long
  39.  
  40.  
  41. ' World objects
  42.  
  43. Declare Function SCreateArc Lib "FG.VBX" Alias "SCreateArc" (ByVal PictureHandle&, ByVal X1#, ByVal Y1#, ByVal X2#, ByVal Y2#, ByVal X3#, ByVal Y3#, ByVal X4#, ByVal Y4#) As Long
  44. Declare Function SCreateChord Lib "FG.VBX" Alias "SCreateChord" (ByVal PictureHandle&, ByVal X1#, ByVal Y1#, ByVal X2#, ByVal Y2#, ByVal X3#, ByVal Y3#, ByVal X4#, ByVal Y4#) As Long
  45. Declare Function SCreateDrawText Lib "FG.VBX" Alias "SCreateDrawText" (ByVal PictureHandle&, ByVal NewText$, ByVal RectLeft#, ByVal RectTop#, ByVal RectWidth#, ByVal RectHeight#, ByVal nFormat%) As Long
  46. Declare Function SCreateEllipse Lib "FG.VBX" Alias "SCreateEllipse" (ByVal PictureHandle&, ByVal X1#, ByVal Y1#, ByVal X2#, ByVal Y2#) As Long
  47. Declare Function SCreateLine Lib "FG.VBX" Alias "SCreateLine" (ByVal PictureHandle&, ByVal X1#, ByVal Y1#, ByVal X2#, ByVal Y2#) As Long
  48. Declare Function SCreatePolygon Lib "FG.VBX" Alias "SCreatePolygon" (ByVal PictureHandle&) As Long
  49. Declare Function SBCreatePolygon Lib "FG.VBX" Alias "SBCreatePolygon" (ByVal PictureHandle&, ThePoints() As SCALEPOINTAPI) As Long
  50. Declare Function SCreatePie Lib "FG.VBX" Alias "SCreatePie" (ByVal PictureHandle&, ByVal X1#, ByVal Y1#, ByVal X2#, ByVal Y2#, ByVal X3#, ByVal Y3#, ByVal X4#, ByVal Y4#) As Long
  51. Declare Function SCreatePolyline Lib "FG.VBX" Alias "SCreatePolyLine" (ByVal PictureHandle&) As Long
  52. Declare Function SBCreatePolyline Lib "FG.VBX" Alias "SBCreatePolyLine" (ByVal PictureHandle&, ThePoints() As SCALEPOINTAPI) As Long
  53. Declare Function SCreatePolyPolygon Lib "FG.VBX" Alias "SCreatePolyPolygon" (ByVal PictureHandle&) As Long
  54. Declare Function SBCreatePolyPolygon Lib "FG.VBX" Alias "SBCreatePolyPolygon" (ByVal PictureHandle&, ThePoints() As SCALEPOINTAPI, Polycounts%()) As Long
  55. Declare Function SCReateRectangle Lib "FG.VBX" Alias "SCreateRectangle" (ByVal PictureHandle&, ByVal X1#, ByVal Y1#, ByVal X2#, ByVal Y2#) As Long
  56. Declare Function SCreateRoundRect Lib "FG.VBX" Alias "SCreateRoundRect" (ByVal PictureHandle&, ByVal X1#, ByVal Y1#, ByVal X2#, ByVal Y2#, ByVal X3#, ByVal Y3#) As Long
  57. Declare Function SCreateTextOut Lib "FG.VBX" Alias "SCreateTextOut" (ByVal PictureHandle&, ByVal X1#, ByVal Y1#, ByVal NewText$) As Long
  58. Declare Function SBCreateTabbedTextOut Lib "FG.VBX" Alias "SBCreateTabbedTextOut" (ByVal PictureHandle&, ByVal X#, ByVal Y#, ByVal NewText$, TabStopPositions#(), ByVal TabOrigin#) As Long
  59. Declare Function SCreatePolyTextOut Lib "FG.VBX" Alias "SCreatePolyTextOut" (ByVal PictureHandle&) As Long
  60. Declare Function SBCreatePolyTextOut Lib "FG.VBX" Alias "SBCreatePolyTextOut" (ByVal PictureHandle&, ThePoints() As SCALEPOINTAPI, OutText$()) As Long
  61.  
  62. ' Positive border widths are scalable
  63. Declare Sub SetBorderWidth Lib "FG.VBX" Alias "SETPENWIDTH" (ByVal GraphicHandle&, ByVal nPenStyle%)
  64. ' 0 - Solid
  65. ' 1 - Dash
  66. ' 2 - Dot
  67. ' 3 - Dash Dot
  68. ' 4 - Dash Dot Dot
  69. ' 5 - Transparent
  70. ' 6 - Inside Solid
  71. Declare Sub SetBorderStyle Lib "FG.VBX" Alias "SETPENSTYLE" (ByVal GraphicHandle&, ByVal nPenWidth%)
  72. Declare Sub SetBorderColor Lib "FG.VBX" Alias "SETPENCOLOR" (ByVal GraphicHandle&, ByVal crColor&)
  73.  
  74. ' 0 - Solid
  75. ' 1 - Hollow
  76. ' 2 - Horizontal Lines
  77. ' 3 - Vertical Lines
  78. ' 4 - Upward Diagonal
  79. ' 5 - Downward Diagonal
  80. ' 6 - Cross
  81. ' 7 - Diagonal Cross
  82. Declare Sub SetFillStyle Lib "FG.VBX" Alias "SetFillStyle" (ByVal GraphicHandle&, ByVal nBrushStyle%)
  83. Declare Sub SetFillColor Lib "FG.VBX" Alias "SetFillColor" (ByVal GraphicHandle&, ByVal crColor&)
  84.  
  85. Declare Sub SetFontPixelHeight Lib "FG.VBX" Alias "SetPixelFontHeight" (ByVal GraphicHandle&, ByVal nHeight%)
  86. Declare Sub SetFontPointHeight Lib "FG.VBX" Alias "SetPointFontHeight" (ByVal GraphicHandle&, ByVal nHeight%)
  87. Declare Sub SetFontScaleHeight Lib "FG.VBX" Alias "SetScaleFontHeight" (ByVal GraphicHandle&, ByVal dHeight#)
  88. Declare Sub SetFontPixelWidth Lib "FG.VBX" Alias "SetPixelFontWidth" (ByVal GraphicHandle&, ByVal nWidth%)
  89. Declare Sub SetFontPointWidth Lib "FG.VBX" Alias "SetPointFontWidth" (ByVal GraphicHandle&, ByVal nWidth%)
  90. Declare Sub SetFontScaleWidth Lib "FG.VBX" Alias "SetScaleFontWidth" (ByVal GraphicHandle&, ByVal dWidth#)
  91. Declare Sub SetFontEscapement Lib "FG.VBX" Alias "SetFontEscapement" (ByVal GraphicHandle&, ByVal nEscapement%)
  92. Declare Sub SetFontWeight Lib "FG.VBX" Alias "SetFontWeight" (ByVal GraphicHandle&, ByVal nWeight%)
  93. Declare Sub SetFontItalic Lib "FG.VBX" Alias "SetFontItalic" (ByVal GraphicHandle&, ByVal nItalic%)
  94. Declare Sub SetFontUnderline Lib "FG.VBX" Alias "SetFontUnderline" (ByVal GraphicHandle&, ByVal nUnderline%)
  95. Declare Sub SetFontStrikeOut Lib "FG.VBX" Alias "SetFontStrikeOut" (ByVal GraphicHandle&, ByVal nStrikeOut%)
  96. Declare Sub SetFontFaceName Lib "FG.VBX" Alias "SetFontFaceName" (ByVal GraphicHandle&, ByVal FaceName As String)
  97. Declare Sub SetFontColor Lib "FG.VBX" Alias "SetFontColor" (ByVal GraphicHandle&, ByVal crColor&)
  98.  
  99. Declare Sub SetBackColor Lib "FG.VBX" Alias "SetBackColor" (ByVal GraphicHandle&, ByVal crColor&)
  100. ' 1 - Transparent
  101. ' 2 - Opaque
  102. Declare Sub SetBackStyle Lib "FG.VBX" Alias "SetBackStyle" (ByVal GraphicHandle&, ByVal BackStyle%)
  103. '  1 - Pixel is always black.
  104. '  2 - Pixel is the inverse of the R2_MERGEPEN color (final pixel = ~(pen | screen pixel)).
  105. '  3 - Pixel is a combination of the colors common to both the screen and the inverse of the pen (final pixel = (~pen) & screen pixel).
  106. '  4 - Pixel is the inverse of the pen color.
  107. '  5 - Pixel is a combination of the colors common to both the pen and the inverse of the screen (final pixel = (~screen pixel) & pen).
  108. '  6 - Pixel is the inverse of the screen color.
  109. '  7 - Pixel is a combination of the colors that are in the pen and in the screen, but not in both (final pixel = pen ^ screen pixel).
  110. '  8 - Pixel is the inverse of the R2_MASKPEN color (final pixel = ~(pen & screen pixel)).
  111. '  9 - Pixel is a combination of the colors common to both the pen and the screen (final pixel = pen & screen pixel).
  112. ' 10 - Pixel is the inverse of the R2_XORPEN color (final pixel = ~(pen ^ screen pixel)).
  113. ' 11 - Pixel remains unchanged.
  114. ' 12 - Pixel is a combination of the screen color and the inverse of the pen color (final pixel = (~pen) | screen pixel).
  115. ' 13 - Pixel is the pen color.
  116. ' 14 - Pixel is a combination of the pen color and the inverse of the screen color (final pixel = (~screen pixel) | pen).
  117. ' 15 - Pixel is a combination of the pen color and the screen color (final pixel = pen | screen pixel).
  118. ' 16 - Pixel is always white.
  119. Declare Sub SetDrawMode Lib "FG.VBX" Alias "SETDRAWMODE" (ByVal GraphicHandle&, ByVal NewDrawMode%)
  120. Declare Sub SetVisible Lib "FG.VBX" Alias "SETVISIBLE" (ByVal GraphicHandle&, ByVal IsVisible%)
  121. Declare Sub SetPreserveAttribs Lib "FG.VBX" Alias "SetPreserveAttribs" (ByVal GraphicHandle&, ByVal PreserveAttribs%)
  122.  
  123. Declare Function GetBorderWidth% Lib "FG.VBX" Alias "GETPENWIDTH" (ByVal GraphicHandle&)
  124. Declare Function GetBorderStyle% Lib "FG.VBX" Alias "GETPENSTYLE" (ByVal GraphicHandle&)
  125. Declare Function GetBorderColor& Lib "FG.VBX" Alias "GETPENCOLOR" (ByVal GraphicHandle&)
  126.  
  127. Declare Function GetFillStyle% Lib "FG.VBX" Alias "GetFillStyle" (ByVal GraphicHandle&)
  128. Declare Function GetFillColor& Lib "FG.VBX" Alias "GetFillColor" (ByVal GraphicHandle&)
  129.  
  130. Declare Function GetFontPixelHeight% Lib "FG.VBX" Alias "GetPixelFontHeight" (ByVal GraphicHandle&)
  131. Declare Function GetFontPointHeight% Lib "FG.VBX" Alias "GetPointFontHeight" (ByVal GraphicHandle&)
  132. Declare Sub GetFontScaleHeightEx Lib "FG.VBX" Alias "GetScaleFontHeight" (ByVal GraphicHandle&, dRetVal#)
  133. Declare Function GetFontPixelWidth% Lib "FG.VBX" Alias "GetPixelFontWidth" (ByVal GraphicHandle&)
  134. Declare Function GetFontPointWidth% Lib "FG.VBX" Alias "GetPointFontWidth" (ByVal GraphicHandle&)
  135. Declare Sub GetFontScaleWidthEx Lib "FG.VBX" Alias "GetScaleFontWidth" (ByVal GraphicHandle&, dRetVal#)
  136. Declare Function GetFontEscapement% Lib "FG.VBX" Alias "GetFontEscapement" (ByVal GraphicHandle&)
  137. Declare Function GetFontWeight% Lib "FG.VBX" Alias "GetFontWeight" (ByVal GraphicHandle&)
  138. Declare Function GetFontItalic% Lib "FG.VBX" Alias "GetFontItalic" (ByVal GraphicHandle&)
  139. Declare Function GetFontUnderline% Lib "FG.VBX" Alias "GetFontUnderline" (ByVal GraphicHandle&)
  140. Declare Function GetFontStrikeOut% Lib "FG.VBX" Alias "GetFontStrikeOut" (ByVal GraphicHandle&)
  141. Declare Sub GetFontFaceNameex Lib "FG.VBX" Alias "GetFontFaceName" (ByVal GraphicHandle&, ByVal RetSTring$)
  142. Declare Function GetFontColor& Lib "FG.VBX" Alias "GetFontColor" (ByVal GraphicHandle&)
  143.  
  144. Declare Function GetBackColor& Lib "FG.VBX" Alias "GetBackColor" (ByVal GraphicHandle&)
  145. Declare Function GetBackStyle% Lib "FG.VBX" Alias "GetBackStyle" (ByVal GraphicHandle&)
  146. Declare Function GetDrawMode% Lib "FG.VBX" Alias "GETDRAWMODE" (ByVal GraphicHandle&)
  147. Declare Function GetVisible% Lib "FG.VBX" Alias "GETVISIBLE" (ByVal GraphicHandle&)
  148. Declare Function GetPreserveAttribs% Lib "FG.VBX" Alias "GetPreserveAttribs" (ByVal GraphicHandle&)
  149.  
  150.  
  151.  
  152. ' Object manipulation functions
  153.  
  154. Declare Sub SetX Lib "FG.VBX" Alias "SetX" (ByVal GraphicHandle&, ByVal Idx%, ByVal X%)
  155. Declare Function GetX Lib "FG.VBX" Alias "GetX" (ByVal GraphicGHandle&, ByVal Idx%) As Integer
  156. Declare Sub SetY Lib "FG.VBX" Alias "SetY" (ByVal GraphicHandle&, ByVal Idx%, ByVal Y%)
  157. Declare Function GetY Lib "FG.VBX" Alias "GetY" (ByVal GraphicGHandle&, ByVal Idx%) As Integer
  158.  
  159. Declare Sub SSetX Lib "FG.VBX" Alias "ScaleSetX" (ByVal GraphicHandle&, ByVal Idx%, ByVal X#)
  160. Declare Sub SGetXex Lib "FG.VBX" Alias "ScaleGetX" (ByVal GraphicGHandle&, ByVal Idx%, RetX#)
  161. Declare Sub SSetY Lib "FG.VBX" Alias "ScaleSetY" (ByVal GraphicHandle&, ByVal Idx%, ByVal Y#)
  162. Declare Sub SGetYex Lib "FG.VBX" Alias "ScaleGetY" (ByVal GraphicGHandle&, ByVal Idx%, RetY#)
  163.  
  164. Declare Sub ADDPoint Lib "FG.VBX" Alias "AddXY" (ByVal GraphicGHandle&, ByVal NewX%, ByVal NewY%)
  165. Declare Sub SAddPoint Lib "FG.VBX" Alias "ScaleAddXY" (ByVal GraphicGHandle&, ByVal NewX#, ByVal NewY#)
  166. Declare Function GetNumPoints Lib "FG.VBX" Alias "GetSize" (ByVal GraphicHandle&) As Integer
  167. Declare Sub RemoveAllPoints Lib "FG.VBX" Alias "RemoveAllPoints" (ByVal GraphicGHandle&)
  168. Declare Sub InsertPointAt Lib "FG.VBX" Alias "InsertPointAt" (ByVal GraphicGHandle&, ByVal nIndex%, ByVal dNewX%, ByVal dNewY%)
  169. Declare Sub RemovePointAt Lib "FG.VBX" Alias "RemovePointAt" (ByVal GraphicGHandle&, ByVal nIndex%)
  170. Declare Sub SInsertPointAt Lib "FG.VBX" Alias "ScaleInsertPointAt" (ByVal GraphicGHandle&, ByVal nIndex%, ByVal dNewX#, ByVal dNewY#)
  171. Declare Sub RemoveAllPolyCounts Lib "FG.VBX" Alias "RemoveAllPolyCounts" (ByVal GraphicGHandle&)
  172. Declare Sub SetPolyCount Lib "FG.VBX" Alias "SetPolyCount" (ByVal GraphicGHandle&, ByVal nIndex%, ByVal nCount%)
  173. Declare Sub AddPolyCount Lib "FG.VBX" Alias "AddPolyCount" (ByVal GraphicGHandle&, ByVal nNewCount%)
  174. Declare Sub InsertPolyCountAt Lib "FG.VBX" Alias "InsertPolyCountAt" (ByVal GraphicGHandle&, ByVal nIndex%, ByVal nNewCount%)
  175. Declare Sub RemovePolyCountAt Lib "FG.VBX" Alias "RemovePolyCountAt" (ByVal GraphicGHandle&, ByVal nIndex%)
  176. Declare Function GetNumPolyCounts Lib "FG.VBX" Alias "GetNumCounts" (ByVal GraphicHandle&) As Integer
  177. Declare Sub SetString Lib "FG.VBX" Alias "SetText" (ByVal GraphicGHandle&, ByVal pNewText As String)
  178. Declare Sub GetStringex Lib "FG.VBX" Alias "GetText" (ByVal GraphicGHandle&, ByVal pNewText As String)
  179. Declare Sub AddPText Lib "FG.VBX" Alias "AddPText" (ByVal PolyTextHandle&, ByVal nNewX%, ByVal nNewY%, ByVal pNewText$)
  180. Declare Sub SAddPText Lib "FG.VBX" Alias "WorldAddPText" (ByVal PolyTextHandle&, ByVal dNewX#, ByVal dNewY#, ByVal pNewText$)
  181. Declare Sub SetPTextAt Lib "FG.VBX" Alias "SetPTextAt" (ByVal PolyTextHandle&, ByVal nIdx%, ByVal pNewText$)
  182. Declare Sub GetPTextAtex Lib "FG.VBX" Alias "GetPTextAt" (ByVal PolyTextHandle&, ByVal nIdx%, ByVal pNewText$)
  183. Declare Sub RemoveAllPText Lib "FG.VBX" Alias "RemoveAllPText " (ByVal PolyTextHandle&)
  184. Declare Sub InsertPTextAt Lib "FG.VBX" Alias "InsertPTextAt" (ByVal PolyTextHandle&, ByVal nIdx%, ByVal X%, ByVal Y%, ByVal pNewText$)
  185. Declare Sub SInsertPTextAt Lib "FG.VBX" Alias "WorldInsertPTextAt" (ByVal PolyTextHandle&, ByVal nIdx%, ByVal X#, ByVal Y#, ByVal pNewText$)
  186. Declare Sub RemovePTextAt Lib "FG.VBX" Alias "RemovcePTextAt" (ByVal PolyTextHandle&, ByVal nIdx%)
  187.  
  188. Declare Sub ToScaleXY Lib "FG.VBX" Alias "PhysicalToScale" (ByVal PictureHandle&, X#, Y#)
  189. Declare Sub ToPhysicalXY Lib "FG.VBX" Alias "ScaleToPhysical" (ByVal PictureHandle&, X#, Y#)
  190. Declare Sub ToScaleWH Lib "FG.VBX" Alias "PhysicalToScaleWH" (ByVal PictureHandle&, TWidth#, THeight#)
  191. Declare Sub ToPhysicalWH Lib "FG.VBX" Alias "ScaleToPhysicalWH" (ByVal PictureHandle&, TWidth#, THeight#)
  192.  
  193. Declare Function GetTextWidth Lib "FG.VBX" Alias "GetTextWidth" (ByVal PictureHandle&, ByVal hDC%, ByVal Text$) As Integer
  194. Declare Function GetTextHeight Lib "FG.VBX" Alias "GetTextHeight" (ByVal PictureHandle&, ByVal hDC%, ByVal Text$) As Integer
  195. Declare Sub GetScaleTextWidthex Lib "FG.VBX" Alias "GetScaleTextWidth" (ByVal PictureHandle&, ByVal hDC%, ByVal Text$, dRetVal#)
  196. Declare Sub GetScaleTextHeightex Lib "FG.VBX" Alias "GetScaleTextHeight" (ByVal PictureHandle&, ByVal hDC%, ByVal Text$, dRetVal#)
  197.  
  198. 'Common functions
  199.  
  200. Declare Sub SetScale Lib "FG.VBX" Alias "SETPICWORLD" (ByVal PictureHandle&, ByVal WorldLeft#, ByVal WorldTop#, ByVal WorldWidth#, ByVal WorldHeight#)
  201. Declare Sub SetPlacement Lib "FG.VBX" Alias "SETPICPHYSICAL" (ByVal PictureHandle&, ByVal PhysicalLeft#, ByVal PhysicalTop#, ByVal PhysicalWidth#, ByVal PhysicalHeight#)
  202. Declare Function IsScaleble Lib "FG.VBX" Alias "IsScalable" (ByVal GraphicHandle&) As Integer
  203.  
  204. Declare Sub DoScale Lib "FG.VBX" Alias "REALIZE" (ByVal GraphicHandle&)
  205. Declare Sub DoPaint Lib "FG.VBX" Alias "DOPAINT" (ByVal GraphicHandle&)
  206. Declare Sub DoDraw Lib "FG.VBX" Alias "DODRAW" (ByVal GraphicHandle&, ByVal ThehDC%)
  207. Declare Sub ClearAll Lib "FG.VBX" Alias "CLEARALL" (ByVal PictureHandle&)
  208. ' There are a few ways in which an object is removed.
  209. '   0-No Drawing
  210. '   1-Draw object to its background color
  211. '   2-Redraw the object with its current settings.  (this is incase it is xor'ing)
  212. Declare Sub RemoveObject Lib "FG.VBX" Alias "REMOVEOBJECT" (ByVal GraphicHandle&, ByVal ThehDC%, ByVal RemoveMode%, ByVal ShouldRemoveObject%, ByVal DrawColor&)
  213.  
  214. Function GetFontFaceName (GraphicHandle As Long) As String
  215.     Dim APISTR As String * 64
  216.     Dim RetSTring As String
  217.  
  218.     GetFontFaceNameex GraphicHandle, APISTR
  219.     RetSTring = Left$(APISTR, InStr(APISTR, Chr$(0)))
  220.     GetFontFaceName = RetSTring
  221. End Function
  222.  
  223. Function GetFontScaleHeight (GraphicHandle As Long) As Double
  224.     Dim Dummy As Double
  225.  
  226.     GetFontScaleHeightEx GraphicHandle, Dummy
  227.     GetFontScaleHeight = Dummy
  228. End Function
  229.  
  230. Function GetFontScaleWidth (GraphicHandle As Long) As Double
  231.     Dim Dummy As Double
  232.  
  233.     GetFontScaleWidthEx GraphicHandle, Dummy
  234.     GetFontScaleWidth = Dummy
  235. End Function
  236.  
  237. Function GetPTextAt (GraphicHandle As Long, Idx As Integer) As String
  238.     Dim APISTR As String * 64
  239.     Dim RetSTring As String
  240.  
  241.     GetPTextAtex GraphicHandle, Idx, APISTR
  242.     RetSTring = Left$(APISTR, InStr(APISTR, Chr$(0)))
  243.     GetPTextAt = RetSTring
  244. End Function
  245.  
  246. Function GetScaleTextHeight (PictureHandle As Long, hDC As Integer, Text As String) As Double
  247.     Dim Dummy As Double
  248.  
  249.     GetScaleTextHeightex PictureHandle, hDC, Text, Dummy
  250.     GetScaleTextHeight = Dummy
  251. End Function
  252.  
  253. Function GetScaleTextWidth (GraphicHandle As Long, hDC As Integer, Text As String) As Double
  254.     Dim Dummy As Double
  255.  
  256.     GetScaleTextWidthex GraphicHandle, hDC, Text, Dummy
  257.     GetScaleTextWidth = Dummy
  258. End Function
  259.  
  260. Function GetString (GraphicHandle As Long) As String
  261.     Dim APISTR As String * 64
  262.     Dim RetSTring As String
  263.  
  264.     GetStringex GraphicHandle, APISTR
  265.     RetSTring = Left$(APISTR, InStr(APISTR, Chr$(0)) - 1)
  266.     GetString = RetSTring
  267. End Function
  268.  
  269. Function SGetX (GraphicHandle As Long, Idx As Integer) As Double
  270.     Dim Dummy As Double
  271.  
  272.     SGetXex GraphicHandle, Idx, Dummy
  273.     SGetX = Dummy
  274. End Function
  275.  
  276. Function SGetY (GraphicHandle As Long, Idx As Integer) As Double
  277.     Dim Dummy As Double
  278.  
  279.     SGetYex GraphicHandle, Idx, Dummy
  280.     SGetY = Dummy
  281. End Function
  282.  
  283.